<cfparam name="perPage" default="200">
<cfparam name="perTop" default="0">
<!--- get scan data --->
<cfparam default="0"  name="url.page">

<cfquery  datasource="101tf2" name="getScan">
<cfif isdefined('ftag')>
select  * from scan  where  scan.id in (select id from (
select id,count(tag) as tt from scanTags where tag IN (#PreserveSingleQuotes(ListQualify(ftag,"'"))#)   group by id having count(tag) = #ListLen(ftag)#) as v )
 and hide = 'no'
        order by  date desc LIMIT #url.page#,#perPage#
<cfelseif isdefined('list')>      
select  * from scan  where  scan.id in (
select sid from mylist where lid='#list#'
 )
 and hide = 'no'
        order by  date desc LIMIT #url.page#,#perPage#
<cfelseif isdefined('fav')>      
select  * from scan  where  scan.id in (
select sid from mylist where lid= (select id from list where type ='favitem' limit 0,1)
 )
 and hide = 'no'
        order by  date desc LIMIT #url.page#,#perPage#        
<cfelse>
select  * from scan where  hide = 'no' order by date desc LIMIT #url.page#,#perPage#
</cfif> 
</cfquery> 

<!--- query the tag here instead of the output --->
<cfquery  datasource="101tf2" name="getScanTags">
 select  * from scanTags  where  id IN <cfif getScan.recordcount>(#PreserveSingleQuotes(QuotedValueList(getScan.id))#)<cfelse>('')</cfif>
</cfquery>

<cfset ScanTags=StructNew()>
<cfloop query="getScanTags">
	<cfif StructKeyExists(ScanTags,id)>
        <cfset ScanTags[id]="#ScanTags[id]#, #tag#">
    <cfelse>
        <cfset ScanTags[id]=tag>
    </cfif>
</cfloop>

<!--- query the tag here instead of the output --->
<cfquery  datasource="101tf2" name="getScanTags">
 select  * from mylist,list  where id=lid and sid IN <cfif getScan.recordcount>(#PreserveSingleQuotes(QuotedValueList(getScan.id))#)<cfelse>('')</cfif>
</cfquery>

<cfset ListScan=StructNew()>
<cfloop query="getScanTags">
        <cfset ListScan["#type##sid#"]=lid>
</cfloop>

<!--- query the total size --->
<cfquery  datasource="101tf2" name="getScanSize">
 select  sum(size) as totalSize from scan
</cfquery>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<cfoutput><title>MT: Page[#page#] <cfif isdefined('ftag')>ftag[#ftag#]</cfif></title></cfoutput>
<meta name="Description" content="FCT01 by SymiSun* is an open source XHTML 1.0 and CSS valid template, released under the creative commons license." />
<meta name="Keywords" content="symisun, symisun*, free css template, valid xhtml template, open source template, free xhtml template, ftc01, symisun 01" />
<link rel="stylesheet" media="screen" href="mt.css" />
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon" /><!-- custom favicon -->
<meta name="Author" content="SymiSun* - symisun.com" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="imagetoolbar" content="no" /><!-- disable IE's image toolbar -->
<script>
var myHorizontalSlide2;
var myHorizontalSlide;
var el ;
var el1 ;
</script>
<script type="text/javascript" src="/js/common.js"></script>
<script type="text/javascript" src="/js/mootools.js"></script>
<script type="text/javascript" src="/js/Fx.Slide/menu.js"></script>
</head>

<body>
<div id="daddy">
	<div id="header">
		<div id="logo"><a href="./"><img src="images/logo.gif" alt="Your Company Logo" width="318" height="85" /></a><span id="logo-text"><a href="./">cf_MyTube</a></span></div><!-- logo -->
		<div id="menu">
			<ul>
				<li><a href="./" id="active">Home</a></li>
				<li><a href="./">Articles</a></li>
				<li><a href="?Fav">Fav</a></li>
				<li><a href="#" onclick="getMoPage('/listForm.cfm','List');">Lists</a></li>
				<li><a href="#" onclick="getMoPage('/tagSearchForm.cfm','Search');">Search</a></li>
				<li><a href="#"  onclick="getIndexForm('/admin.cfm','Indexer'); ">Indexer</a></li>
			</ul>
		</div><!-- menu -->
		<div id="ticker">
			Visit <a href="http://www.symisun.com/templates/">templates area</a> on our site to get the latest version of this template and more free templates.
		</div><!-- ticker -->
		<div id="headerimage">
        <div id="headnew">
			
  <!-- download -->
          <div id="iconsHolder"> <div id="download"><span id="download-text">Total Scanned Files Size <cfoutput>#byteConvert(getScanSize.totalSize)#</cfoutput></span></div>
				<div id="icons">
				<a href="./" ><img src="images/icon_home.gif" alt="Home" width="13" height="13" id="home" /></a>
				<a href="./"><img src="images/icon_sitemap.gif" alt="Sitemap" width="13" height="13" id="sitemap" /></a>
				<a href="./"><img src="images/icon_contact.gif" alt="Contact" width="13" height="13" id="contact" /></a>			
                </div>
                <!-- icons -->
          </div> 
       <div  >   
       <div  id="tagSearch">Tags Search                          </div> 


             <div      id="horizontal_slide" class="tagList" >   
 			 
             <cfinclude template="tagSearchForm.cfm">

                   
              </div>
         </div>      
			<div id="slogan"><!--- your slogan could go here ---></div>
            
            <div  class="top10" ><cfoutput><cfloop from=1 to =#perTop# index=i><div id="topitem#i#" class="lastest"></div></cfloop></cfoutput></div>
		</div>
      </div>
		<!-- headerimage -->
	</div>
	<!-- header --> 
    <!--  the following hidden div will be used by the script -->

<div id="content">
		<div id="cA">
			<div class="Ctopleft"></div>
			<!-- search -->
</div> <div id="cB">
			<div class="Ctopright"></div>
		  <div id="cB1"></div>
			<!-- cB1 -->
			<div id="cB2">
			  <!-- newsletter -->
</div>
			<!-- cB2 -->
		</div><!-- cB -->

   <!---  <cfoutput><a href="?page=#ListLast(page)#,#ListLast(page)+perPage#<cfif isdefined('ftag')>&ftag=#ftag#</cfif>">Next</a></cfoutput> --->
   <div id="displayItems">
  <cfif not getScan.recordcount><div id="nodata">Nothing to show!</div></cfif>
			<cfoutput query="getScan"    >
           	
           <cftry>
            <cfset path="#dir#\#name#">
                <div class="lastest" id="fdiv#currentrow#" <cfif currentrow lte pertop> style="display:none" </cfif>> 
                <div class="imageTopBar" id="imgBar#currentrow#" onclick='showHideTbar(document.getElementById("imgBar#currentrow#"),event)'>
                        <div class="actionIcon">
                            <a  href="##"  class="floatLeft" onclick="if (confirm('are you sure!')){fDelete('#id#','fdiv#currentrow#')}">Hide</a>
                            <div id="alert#id#" class="alertAjax" style="display:none;"></div>
                            <div class="favbg floatRight" title="Check to add to Fav">	
                            <input <cfif StructKeyExists(ListScan,'favitem#id#')> checked</cfif> onclick='setList(this,document.getElementById("alert#id#"))' name="favitem" type="checkbox"  value="#id#"   />
                            </div>
                            <div class="listbg floatRight" title="Check to add to list">
                            <input <cfif StructKeyExists(ListScan,'listitem#id#')> checked</cfif> onclick='setList(this,document.getElementById("alert#id#"))' name="listitem" type="checkbox" value="#id#"   />
                            </div>
                            <!--- <a  href="?#dir#/#name#" class="floatRight" target="_blank"> List | </a> 
                            <a  href="?#dir#/#name#" class="floatRight" target="_blank"> Fav | </a>---> 
                        </div>
                </div>
                <map name="Map#currentrow#" id="Map#currentrow#">
                <cfif findnocase('jpg',name)>
                	<cfif FileExists('#ExpandPath("/")#/temp/#id#.jpg')>
                     <img class="imgbrd" src="/temp/#id#.jpg"  width="195"  height=195 id="img#currentrow#" usemap="##Map#currentrow#"/>
                    <cfelse>
                    
                   <img class="imgbrd" src="http://#cgi.SERVER_NAME#:8888/getImageThumb.cfm?id=#id#"  id="img#currentrow#" usemap="##Map#currentrow#" width="195"  height=195 />
                   </cfif>
                <cfelseif findnocase('mp3',name)>
                <img class="imgbrd" src="#VideoThumbURL#no.png"  width="195"  height=173 id="img#currentrow#" usemap="##Map#currentrow#" />
                        <object type="application/x-shockwave-flash" data="../player_mp3.swf" width="205" height="20" align="middle">
                         <param name="movie" value="../player_mp3.swf" />
                         <param name="FlashVars" value="mp3=http://#cgi.SERVER_NAME#:8888/getfile.cfm?id=#id#" />
                    </object>   
                <cfelse >
                	
                    <cfif not FileExists('#VideoThumbPath##id#-1.jpg')>
                        <img class="imgbrd" src="#VideoThumbURL#no.png"  width="195"  height="195" id="img#currentrow#" usemap="##Map#currentrow#"/>   
                    <cfelse>
                        <img class="imgbrd"    src="#VideoThumbURL##id#-1.jpg"  
                        width="195"  
                        height="195"   
                        alt='#VideoThumbURL##id#-'
                        id="img#currentrow#" usemap="##Map#currentrow#" />  
                        <area shape="rect" coords="1,41,319,240"  
                        onmouseover='ani(document.getElementById("img#currentrow#"))'  />  
                    </cfif>                       
                </cfif>
                 	
                     <area shape="rect" coords="-10,-11,318,39"  
                      
                     onclick='showHideTbar(document.getElementById("imgBar#currentrow#"),event)'
                      />
                 </map>
                    <div class="info">
                   		<cfinclude template="itemInfo.cfm">
                    </div>
               </div>
             <cfcatch></cfcatch>
            </cftry>
            
			 
            </cfoutput>	

	 	  </div>
		<!-- cA -->
		<!-- cB -->
<div class="Cpad">
			<br class="clear" /><div class="Cbottom"><div class="Cbottomleft"></div><div class="Cbottomright"></div></div>
	  </div><!-- Cpad -->
	</div><!-- content -->
  <div id="properspace"></div><!-- properspace -->
</div>
<!-- daddy -->
<div id="footer">
	<div id="foot">
		<div id="foot1"><a href="./">Privacy Policy</a> - <a href="./">Terms Of Use</a></div><!-- foot1 -->
		<div id="foot2">
			<span class="valid">Valid <a href="http://validator.w3.org/check?uri=referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span>Copyright 2007, Your Company. Designed by <a href="http://www.symisun.com/" title="We digitalize your ambitions">SymiSun<span class="star">*</span></a>
		</div><!-- foot1 -->
	</div><!-- foot -->
</div>
<!-- footer -->
<!--- I dont know if we need this --->
<cfoutput>
	<script>
		<cfloop from=1 to =#perTop# index=i>
		document.getElementById("topitem#i#").innerHTML=document.getElementById("fdiv#i#").innerHTML;
		</cfloop>
    </script>
</cfoutput>


<cfoutput>
<!--- navigation --->
<div id="divTopRight"     style=" position:fixed; z-index:1; width:100%; float:right;top:400px; "  align="right">
	<a href='?page=#page+perPage#<cfif isdefined('ftag')>&ftag=#ftag#</cfif>'><img src="images/arrowleft.png" alt="" align="right" width="36" border="0" height="40" /></a> 
</div>
<!--- navigation --->
<cfif #Page# neq 0>
    <div id="divTopLeft"     style="position:fixed; z-index:1001; top:400px;   width:100; float:right;   " align="left">
     <a href="?page=#page-perPage#<cfif isdefined('ftag')>&ftag=#ftag#</cfif>">
      <img src="images/arrowright.png" alt="" width="36" height="40" /></a>
    </div>
</cfif>
<!--- dimming and progress area --->
<div id="dimming"> 
	
</div> 
<div id="progressContainer"   >
    <div id="progressBarOuter"  >
        <div id="progressBar"  >
             <div id="per"  > </div>
             <div id="txt"  > </div>
        </div>   	
    </div> 
    <div id="ProgressClose" class="floatRight" style="cursor:pointer;Display:none" 
    onclick="top.$(top.document.body).setStyle('overflow', 'visible');top.$('dimming').setStyle('display', 'none');top.$('progressContainer').setStyle('display', 'none');top.$('preFrames').setStyle('display', 'none');">Close</div>
     <div id="ProgressCancel" class="floatRight" style="cursor:pointer;" 
    onclick="top.window.location='/?Canceled'">Cancel</div>
    
</div>
<!--- Preview iframes --->    
<div id="preFrames">
    <cfloop from=1 to=#NumberOfVideoThumbNails# index="i">
    <iframe src="" height="200" width="200" id="snap#i#" 
    scrolling="no" allowtransparency="yes" frameborder="0" marginheight="0" marginwidth="0" >
    </iframe>
    </cfloop>
</div>
</cfoutput>
<!--- this is action frame [cant use ajax:(] --->
<iframe src="" height="200" width="200" name="dframe" 
scrolling="no" allowtransparency="no" frameborder="0" marginheight="0" marginwidth="0" >
</iframe>

</body>
</html>
